package git.bankview.wl.common;

import java.util.*;
import java.text.*;
import java.sql.*;

import laya.semi.process.*;

import git.bankview.sl.db.*;

import org.apache.log4j.Logger;

public class RealFieldToPercentsDecorator
	implements IGenericClassActivity
{
	private static Logger log = Logger.getLogger(RealFieldToPercentsDecorator.class);

	public void execute(IProcessContext oCtx)
		throws Exception
	{
		String[] vPairs = oCtx.getActivityParameter().split(":");
		
		for (int i = 0; i < vPairs.length; ++i)
		{
			String[] vDestSrc = vPairs[i].split("=");
			Number oSrc = (Number)oCtx.getField(vDestSrc[1]);
			oCtx.setField(vDestSrc[0], new Double(oSrc.doubleValue() * 100.0));
		}
	}
}
